Optimal. Leaf size=87 \[ -\frac {2 e (2 c d-b e) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c \sqrt {b^2-4 a c}}-\frac {(d+e x)^2}{a+b x+c x^2}+\frac {e^2 \log \left (a+b x+c x^2\right )}{c} \]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {768, 634, 618, 206, 628} \begin {gather*} -\frac {2 e (2 c d-b e) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c \sqrt {b^2-4 a c}}-\frac {(d+e x)^2}{a+b x+c x^2}+\frac {e^2 \log \left (a+b x+c x^2\right )}{c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 618
Rule 628
Rule 634
Rule 768
Rubi steps
\begin {align*} \int \frac {(b+2 c x) (d+e x)^2}{\left (a+b x+c x^2\right )^2} \, dx &=-\frac {(d+e x)^2}{a+b x+c x^2}+(2 e) \int \frac {d+e x}{a+b x+c x^2} \, dx\\ &=-\frac {(d+e x)^2}{a+b x+c x^2}+\frac {e^2 \int \frac {b+2 c x}{a+b x+c x^2} \, dx}{c}+\frac {(e (2 c d-b e)) \int \frac {1}{a+b x+c x^2} \, dx}{c}\\ &=-\frac {(d+e x)^2}{a+b x+c x^2}+\frac {e^2 \log \left (a+b x+c x^2\right )}{c}-\frac {(2 e (2 c d-b e)) \operatorname {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{c}\\ &=-\frac {(d+e x)^2}{a+b x+c x^2}-\frac {2 e (2 c d-b e) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c \sqrt {b^2-4 a c}}+\frac {e^2 \log \left (a+b x+c x^2\right )}{c}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.11, size = 98, normalized size = 1.13 \begin {gather*} \frac {-\frac {2 e (b e-2 c d) \tan ^{-1}\left (\frac {b+2 c x}{\sqrt {4 a c-b^2}}\right )}{\sqrt {4 a c-b^2}}+\frac {e^2 (a+b x)-c d (d+2 e x)}{a+x (b+c x)}+e^2 \log (a+x (b+c x))}{c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(b+2 c x) (d+e x)^2}{\left (a+b x+c x^2\right )^2} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.44, size = 573, normalized size = 6.59 \begin {gather*} \left [-\frac {{\left (b^{2} c - 4 \, a c^{2}\right )} d^{2} - {\left (a b^{2} - 4 \, a^{2} c\right )} e^{2} + {\left (2 \, a c d e - a b e^{2} + {\left (2 \, c^{2} d e - b c e^{2}\right )} x^{2} + {\left (2 \, b c d e - b^{2} e^{2}\right )} x\right )} \sqrt {b^{2} - 4 \, a c} \log \left (\frac {2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c + \sqrt {b^{2} - 4 \, a c} {\left (2 \, c x + b\right )}}{c x^{2} + b x + a}\right ) + {\left (2 \, {\left (b^{2} c - 4 \, a c^{2}\right )} d e - {\left (b^{3} - 4 \, a b c\right )} e^{2}\right )} x - {\left ({\left (b^{2} c - 4 \, a c^{2}\right )} e^{2} x^{2} + {\left (b^{3} - 4 \, a b c\right )} e^{2} x + {\left (a b^{2} - 4 \, a^{2} c\right )} e^{2}\right )} \log \left (c x^{2} + b x + a\right )}{a b^{2} c - 4 \, a^{2} c^{2} + {\left (b^{2} c^{2} - 4 \, a c^{3}\right )} x^{2} + {\left (b^{3} c - 4 \, a b c^{2}\right )} x}, -\frac {{\left (b^{2} c - 4 \, a c^{2}\right )} d^{2} - {\left (a b^{2} - 4 \, a^{2} c\right )} e^{2} + 2 \, {\left (2 \, a c d e - a b e^{2} + {\left (2 \, c^{2} d e - b c e^{2}\right )} x^{2} + {\left (2 \, b c d e - b^{2} e^{2}\right )} x\right )} \sqrt {-b^{2} + 4 \, a c} \arctan \left (-\frac {\sqrt {-b^{2} + 4 \, a c} {\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) + {\left (2 \, {\left (b^{2} c - 4 \, a c^{2}\right )} d e - {\left (b^{3} - 4 \, a b c\right )} e^{2}\right )} x - {\left ({\left (b^{2} c - 4 \, a c^{2}\right )} e^{2} x^{2} + {\left (b^{3} - 4 \, a b c\right )} e^{2} x + {\left (a b^{2} - 4 \, a^{2} c\right )} e^{2}\right )} \log \left (c x^{2} + b x + a\right )}{a b^{2} c - 4 \, a^{2} c^{2} + {\left (b^{2} c^{2} - 4 \, a c^{3}\right )} x^{2} + {\left (b^{3} c - 4 \, a b c^{2}\right )} x}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.18, size = 114, normalized size = 1.31 \begin {gather*} \frac {e^{2} \log \left (c x^{2} + b x + a\right )}{c} + \frac {2 \, {\left (2 \, c d e - b e^{2}\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{\sqrt {-b^{2} + 4 \, a c} c} - \frac {\frac {{\left (2 \, c d e - b e^{2}\right )} x}{c} + \frac {c d^{2} - a e^{2}}{c}}{c x^{2} + b x + a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 141, normalized size = 1.62 \begin {gather*} -\frac {2 b \,e^{2} \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}\, c}+\frac {4 d e \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}+\frac {e^{2} \ln \left (c \,x^{2}+b x +a \right )}{c}+\frac {\frac {\left (b e -2 c d \right ) e x}{c}+\frac {a \,e^{2}-c \,d^{2}}{c}}{c \,x^{2}+b x +a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.18, size = 248, normalized size = 2.85 \begin {gather*} \frac {a\,e^2}{c^2\,x^2+b\,c\,x+a\,c}-\frac {d^2}{c\,x^2+b\,x+a}+\frac {b\,e^2\,x}{c^2\,x^2+b\,c\,x+a\,c}-\frac {2\,d\,e\,x}{c\,x^2+b\,x+a}-\frac {b^2\,e^2\,\ln \left (c\,x^2+b\,x+a\right )}{4\,a\,c^2-b^2\,c}+\frac {4\,d\,e\,\mathrm {atan}\left (\frac {b}{\sqrt {4\,a\,c-b^2}}+\frac {2\,c\,x}{\sqrt {4\,a\,c-b^2}}\right )}{\sqrt {4\,a\,c-b^2}}-\frac {2\,b\,e^2\,\mathrm {atan}\left (\frac {b}{\sqrt {4\,a\,c-b^2}}+\frac {2\,c\,x}{\sqrt {4\,a\,c-b^2}}\right )}{c\,\sqrt {4\,a\,c-b^2}}+\frac {4\,a\,c\,e^2\,\ln \left (c\,x^2+b\,x+a\right )}{4\,a\,c^2-b^2\,c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 4.35, size = 340, normalized size = 3.91 \begin {gather*} \left (\frac {e^{2}}{c} - \frac {e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right )}{c \left (4 a c - b^{2}\right )}\right ) \log {\left (x + \frac {- 4 a c \left (\frac {e^{2}}{c} - \frac {e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right )}{c \left (4 a c - b^{2}\right )}\right ) + 4 a e^{2} + b^{2} \left (\frac {e^{2}}{c} - \frac {e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right )}{c \left (4 a c - b^{2}\right )}\right ) - 2 b d e}{2 b e^{2} - 4 c d e} \right )} + \left (\frac {e^{2}}{c} + \frac {e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right )}{c \left (4 a c - b^{2}\right )}\right ) \log {\left (x + \frac {- 4 a c \left (\frac {e^{2}}{c} + \frac {e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right )}{c \left (4 a c - b^{2}\right )}\right ) + 4 a e^{2} + b^{2} \left (\frac {e^{2}}{c} + \frac {e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right )}{c \left (4 a c - b^{2}\right )}\right ) - 2 b d e}{2 b e^{2} - 4 c d e} \right )} + \frac {a e^{2} - c d^{2} + x \left (b e^{2} - 2 c d e\right )}{a c + b c x + c^{2} x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________